package cn.serenedream.housedecoration.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

public class UserDTO {
    private String id;

    @NotBlank(message = "客户名称不得为空")
    @Size(max = 10, message = "客户名称输入有误")
    private String name;

    @NotBlank(message = "客户的家庭住址不得为空")
    private String address;

    @NotNull(message = "客户的手机号码不得为空")
    @Pattern(regexp = "1[3-9][0-9]{9}", message = "手机号格式不正确")
    private String mobile;

    private String spareMobile;

    public UserDTO() {
    }

    public UserDTO(String id, String name, String address, String mobile, String spareMobile) {
        this.id = id;
        this.name = name;
        this.address = address;
        this.mobile = mobile;
        this.spareMobile = spareMobile;
    }


    /**
     * 获取
     *
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     *
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     *
     * @return address
     */
    public String getAddress() {
        return address;
    }

    /**
     * 设置
     *
     * @param address
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 获取
     *
     * @return mobile
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * 设置
     *
     * @param mobile
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    /**
     * 获取
     *
     * @return spareMobile
     */
    public String getSpareMobile() {
        return spareMobile;
    }

    /**
     * 设置
     *
     * @param spareMobile
     */
    public void setSpareMobile(String spareMobile) {
        this.spareMobile = spareMobile;
    }

    public String toString() {
        return "UserDTO{name = " + name + ", address = " + address + ", mobile = " + mobile + ", spareMobile = " + spareMobile + "}";
    }

    /**
     * 获取
     * @return id
     */
    public String getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(String id) {
        this.id = id;
    }
}
